home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / StandardFile.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  4.3 KB  |  210 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        StandardFile.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
  18. __STANDARDFILE__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25.  
  26.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  27.     include 'Dialogs.a'
  28.     ENDIF
  29. ;        include 'Errors.a'                                            ;
  30. ;        include 'Memory.a'                                            ;
  31. ;            include 'MixedMode.a'                                    ;
  32. ;        include 'Windows.a'                                        ;
  33. ;            include 'Quickdraw.a'                                    ;
  34. ;                include 'QuickdrawText.a'                            ;
  35. ;            include 'Events.a'                                        ;
  36. ;                include 'OSUtils.a'                                ;
  37. ;            include 'Controls.a'                                    ;
  38. ;                include 'Menus.a'                                    ;
  39. ;        include 'TextEdit.a'                                        ;
  40.  
  41.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  42.     include 'Files.a'
  43.     ENDIF
  44.  
  45. ; resource IDs and item offsets of pre-7.0 dialogs 
  46. putDlgID                        EQU        -3999
  47. putSave                            EQU        1
  48. putCancel                        EQU        2
  49. putEject                        EQU        5
  50. putDrive                        EQU        6
  51. putName                            EQU        7
  52. getDlgID                        EQU        -4000
  53. getOpen                            EQU        1
  54. getCancel                        EQU        3
  55. getEject                        EQU        5
  56. getDrive                        EQU        6
  57. getNmList                        EQU        7
  58. getScroll                        EQU        8
  59. ; resource IDs and item offsets of 7.0 dialogs 
  60. sfPutDialogID                    EQU        -6043
  61. sfGetDialogID                    EQU        -6042
  62. sfItemOpenButton                EQU        1
  63. sfItemCancelButton                EQU        2
  64. sfItemBalloonHelp                EQU        3
  65. sfItemVolumeUser                EQU        4
  66. sfItemEjectButton                EQU        5
  67.  
  68. sfItemDesktopButton                EQU        6
  69. sfItemFileListUser                EQU        7
  70. sfItemPopUpMenuUser                EQU        8
  71. sfItemDividerLinePict            EQU        9
  72. sfItemFileNameTextEdit            EQU        10
  73. sfItemPromptStaticText            EQU        11
  74. sfItemNewFolderUser                EQU        12
  75. ; pseudo-item hits for use in DlgHook 
  76. sfHookFirstCall                    EQU        -1
  77. sfHookCharOffset                EQU        $1000
  78. sfHookNullEvent                    EQU        100
  79. sfHookRebuildList                EQU        101
  80. sfHookFolderPopUp                EQU        102
  81. sfHookOpenFolder                EQU        103
  82. ; the following are only in system 7.0+ 
  83. sfHookOpenAlias                    EQU        104
  84. sfHookGoToDesktop                EQU        105
  85. sfHookGoToAliasTarget            EQU        106
  86. sfHookGoToParent                EQU        107
  87. sfHookGoToNextDrive                EQU        108
  88. sfHookGoToPrevDrive                EQU        109
  89. sfHookChangeSelection            EQU        110
  90.  
  91. sfHookSetActiveOffset            EQU        200
  92. sfHookLastCall                    EQU        -2
  93.  
  94. ; the refcon field of the dialog record during a
  95. ; modalfilter or dialoghook contains one of the following 
  96. sfMainDialogRefCon                EQU        'stdf'
  97. sfNewFolderDialogRefCon            EQU        'nfdr'
  98. sfReplaceDialogRefCon            EQU        'rplc'
  99. sfStatWarnDialogRefCon            EQU        'stat'
  100. sfLockWarnDialogRefCon            EQU        'lock'
  101. sfErrorDialogRefCon                EQU        'err '
  102.  
  103. SFReply                 RECORD    0
  104. good                     ds.b    1
  105. copy                     ds.b    1
  106. fType                     ds.l    1
  107. vRefNum                     ds.w    1
  108. version                     ds.w    1
  109. fName                     ds.l    16
  110. sizeof                     EQU    74
  111.                         ENDR
  112.  
  113. StandardFileReply         RECORD    0
  114. sfGood                     ds.b    1
  115. sfReplacing                 ds.b    1
  116. sfType                     ds.l    1
  117. sfFile                     ds        FSSpec
  118. sfScript                 ds.w    1
  119. sfFlags                     ds.w    1
  120. sfIsFolder                 ds.b    1
  121. sfIsVolume                 ds.b    1
  122. sfReserved1                 ds.l    1
  123. sfReserved2                 ds.w    1
  124. sizeof                     EQU    88
  125.                         ENDR
  126.  
  127. ; for CustomXXXFile, ActivationOrderListPtr parameter is a pointer to an array of item numbers 
  128. ; the following also include an extra parameter of "your data pointer" 
  129.     IF GENERATING68K THEN
  130.         Macro
  131.         _SFPutFile
  132.             move.w    #$0001,-(sp)
  133.             dc.w     $A9EA
  134.         EndM
  135.     ELSE
  136.         IMPORT    SFPutFile
  137.     ENDIF
  138.  
  139.     IF GENERATING68K THEN
  140.         Macro
  141.         _SFGetFile
  142.             move.w    #$0002,-(sp)
  143.             dc.w     $A9EA
  144.         EndM
  145.     ELSE
  146.         IMPORT    SFGetFile
  147.     ENDIF
  148.  
  149.     IF GENERATING68K THEN
  150.         Macro
  151.         _SFPPutFile
  152.             move.w    #$0003,-(sp)
  153.             dc.w     $A9EA
  154.         EndM
  155.     ELSE
  156.         IMPORT    SFPPutFile
  157.     ENDIF
  158.  
  159.     IF GENERATING68K THEN
  160.         Macro
  161.         _SFPGetFile
  162.             move.w    #$0004,-(sp)
  163.             dc.w     $A9EA
  164.         EndM
  165.     ELSE
  166.         IMPORT    SFPGetFile
  167.     ENDIF
  168.  
  169.     IF GENERATING68K THEN
  170.         Macro
  171.         _StandardPutFile
  172.             move.w    #$0005,-(sp)
  173.             dc.w     $A9EA
  174.         EndM
  175.     ELSE
  176.         IMPORT    StandardPutFile
  177.     ENDIF
  178.  
  179.     IF GENERATING68K THEN
  180.         Macro
  181.         _StandardGetFile
  182.             move.w    #$0006,-(sp)
  183.             dc.w     $A9EA
  184.         EndM
  185.     ELSE
  186.         IMPORT    StandardGetFile
  187.     ENDIF
  188.  
  189.     IF GENERATING68K THEN
  190.         Macro
  191.         _CustomPutFile
  192.             move.w    #$0007,-(sp)
  193.             dc.w     $A9EA
  194.         EndM
  195.     ELSE
  196.         IMPORT    CustomPutFile
  197.     ENDIF
  198.  
  199.     IF GENERATING68K THEN
  200.         Macro
  201.         _CustomGetFile
  202.             move.w    #$0008,-(sp)
  203.             dc.w     $A9EA
  204.         EndM
  205.     ELSE
  206.         IMPORT    CustomGetFile
  207.     ENDIF
  208.  
  209.     ENDIF ; __STANDARDFILE__
  210.